<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <!-- build:css -->
    <link rel="stylesheet" href="/static/lib/kitadmin/css/layui.css" th:href="@{/lib/kitadmin/css/layui.css}">
    <link rel="stylesheet" href="/static/lib/kitadmin/css/theme/default.css"
          th:href="@{/lib/kitadmin/css/theme/default.css}" id="theme">
    <link rel="stylesheet" href="/static/lib/kitadmin/css/nprogress.css" th:href="@{/lib/kitadmin/css/nprogress.css}">
    <!-- endbuild -->
    <style>
        .eleTree {
            width: 350px;
            height: 500px;
            border: 1px solid #ccc;
            overflow: hidden;
            display: inline-block;
            position: absolute;
        }
    </style>
</head>
<body>
<div class="container">
    <form class="layui-form" lay-filter="form-job">
        <div class="layui-form-item">
            <label class="layui-form-label">任务名称：</label>
            <div class="layui-input-block">
                <input type="text" name="jobName" placeholder="" autocomplete="off" class="layui-input"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">任务组名：</label>
            <div class="layui-input-block">
                <input type="text" name="jobGroup" placeholder="" autocomplete="off" class="layui-input"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">任务方法：</label>
            <div class="layui-input-block">
                <input type="text" name="methodName" placeholder="" autocomplete="off" class="layui-input"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">方法参数：</label>
            <div class="layui-input-block">
                <input type="text" name="methodParams" placeholder="" autocomplete="off" class="layui-input"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">cron：</label>
            <div class="layui-input-block">
                <input type="text" name="cronExpression" placeholder="" autocomplete="off" value="0 * 1 * * ?" class="layui-input"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">错误策略：</label>
            <div class="layui-input-block">
                <input type="radio" name="misfirePolicy" value="1" th:checked="true" title="立即执行"/>
                <input type="radio" name="misfirePolicy" value="2" title="执行一次" />
                <input type="radio" name="misfirePolicy" value="3" title="放弃执行" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">状态：</label>
            <div class="layui-input-block">
                <span th:each="dict : ${@dict.getType('sys_job_status')}">
                    <input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:title="${dict.dictLabel}" th:checked="${dict.isDefault == 'Y' ? true : false}" />
                </span>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">备注信息：</label>
            <div class="layui-input-block">
                <textarea rows="3" name="remark" placeholder="" autocomplete="off" class="layui-textarea"></textarea>
            </div>
        </div>
        <button class="layui-btn" id="btn-add" style="display:none" lay-submit lay-filter="btn-add">创建</button>
    </form>
</div>
<script src="../static/lib/kitadmin/polyfill.min.js" th:src="@{/lib/kitadmin/polyfill.min.js}"></script>
<script src="../static/lib/kitadmin/layui.js" th:src="@{/lib/kitadmin/layui.js}"></script>
<script src="../static/lib/kitadmin/kitadmin.js" th:src="@{/lib/kitadmin/kitadmin.js}"></script>

<script th:inline="javascript">
    var ctx = [[@{
        /}]];
        var editFlag = [[${@permission.hasPermi('system:job:edit')}]];
        var prefix = ctx + "monitor/job";
</script>
<script>
    layui.config({
        base: '/js/admin/job/'
    }).use(['add'], function () {
        var add = layui.add;
        add.init({
            "prefix": prefix,
            "editFlag": editFlag
        });
    });
</script>
</body>
</html>